package com.fh.module_mine.ui.fragment

import com.alibaba.android.arouter.facade.annotation.Route
import com.fh.lib_base.base.BaseFragment
import com.fh.lib_base.config.AppConstants
import com.fh.module_mine.BR
import com.fh.module_mine.R
import com.fh.module_mine.databinding.MineFragmentLoginBinding
import com.fh.module_mine.viewmodel.LoginViewModel
import com.gyf.immersionbar.ImmersionBar

@Route(path = AppConstants.Router.Mine.F_LOGIN)
class LoginFragment: BaseFragment<MineFragmentLoginBinding, LoginViewModel>() {
    
    override fun initVariableId(): Int {
        return BR.viewModel
    }

    override fun initContentView(): Int {
        return R.layout.mine_fragment_login
    }

    override fun onSupportVisible() {
        ImmersionBar.with(this).statusBarDarkFont(false).init()
    }

    override fun useBaseLayout(): Boolean {
        return false
    }

    override fun initData() {
      binding.btnLogin.setOnClickListener {
          viewModel.loginByPwd(binding.etAccount.text.toString(),binding.etPwd.text.toString())
      }
    }

    override fun initViewObservable() {

    }

}